package com.atguigu.product.service.impl;


import com.atguigu.product.bean.Product;
import com.atguigu.product.service.ProductService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class ProductServiceImpl implements ProductService {

    @Override
    public Product getProductById(Long id) {
        Product product = new Product();
        product.setId(id);
        product.setName("apple-"+id);
        product.setPrice(new BigDecimal("99"));
        product.setNum(2);
        // try {
        //     Thread.sleep(1000 * 10);
        // } catch (InterruptedException e) {
        //     throw new RuntimeException(e);
        // }
        return product;
    }
}
